package top.songxs.gmall.feign.search.fallback;

import lombok.extern.slf4j.Slf4j;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.feign.search.GoodsFeignClient;
import top.songxs.gmall.search.dto.SearchParamDTO;
import top.songxs.gmall.search.entity.Goods;
import top.songxs.gmall.search.vo.SearchResponseVo;

@Slf4j
public class GoodsFeignClientFallBack implements GoodsFeignClient {
    @Override
    public Result saveGoods(Goods goods) {
        log.error("saveGoods 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result deleteGoods(Long skuId) {
        log.error("deleteGoods 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result<SearchResponseVo> search(SearchParamDTO searchParamDTO) {
        log.error("search 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result updateHotScore(Long goodsId, Integer hotScore) {
        log.error("updateHotScore 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
